package com.sdyeda.readiot.fx;

import java.io.IOException;

import com.sdyeda.readiot.ReadIotApplication;

import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Modality;
import javafx.stage.Stage;

public class SetSaveWindow {
	
	private SetSaveController setSavecontroller;
	
	public SetSaveWindow(Stage stage, Stage parentstage) {
		FXMLLoader loader = new FXMLLoader(getClass().getResource("SetSave.fxml"));
		loader.setControllerFactory(ReadIotApplication.springContext::getBean);
		try {
			stage.setScene(new Scene(loader.load()));

			stage.setTitle("尾矿库自动数据采集系统--保存设置");
			stage.getIcons().add(new Image(MainWindow.class.getResourceAsStream("/logo.png")));
			stage.initOwner(parentstage);
			stage.initModality(Modality.WINDOW_MODAL);
			stage.setResizable(false);

			setSetSavecontroller(loader.getController());
			setSavecontroller.setStage(stage);

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

	public SetSaveController getSetSavecontroller() {
		return setSavecontroller;
	}

	public void setSetSavecontroller(SetSaveController setSavecontroller) {
		this.setSavecontroller = setSavecontroller;
	}



}
